<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>错误页面 - 云学堂</title>
    <link rel="stylesheet" th:href="@{/css/common.css}">
    <link rel="stylesheet" th:href="@{/css/navbar.css}">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
    <style>
        .error-container {
            max-width: 800px;
            margin: 50px auto;
            text-align: center;
            padding: 2rem;
        }
        
        .error-icon {
            font-size: 5rem;
            color: #dc3545;
            margin-bottom: 1rem;
        }
        
        .error-message {
            font-size: 1.5rem;
            margin-bottom: 2rem;
        }
    </style>
</head>
<body>
<div class="container">
    <nav class="navbar navbar-expand-lg">
        <div class="container">
            <a class="navbar-brand" href="/">云学堂</a>
        </div>
    </nav>
    
    <div class="error-container card">
        <div class="card-body">
            <div class="error-icon">
                <i class="fas fa-exclamation-triangle"></i>
            </div>
            <h1 class="card-title">出错了</h1>
            <p class="error-message" th:text="${errorMessage ?: '系统发生未知错误'}"></p>
            <div class="mt-4">
                <a href="/" class="btn btn-primary me-2">
                    <i class="fas fa-home me-1"></i>返回首页
                </a>
                <button class="btn btn-secondary" onclick="history.back()">
                    <i class="fas fa-arrow-left me-1"></i>返回上页
                </button>
            </div>
        </div>
    </div>
</div>

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>